/*
编写 : Hexh
时间 : 2012-5-7 10:29:52
*/
using System;
using System.Collections;
using System.Text;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Authority;

namespace FsCarInfo.Core.Entity
{
	/// <summary>
	///	the entity of FsBcar
	/// </summary>
	[Serializable]
	public sealed  class FsBcar : InputItem
	{

		#region Private Members
		
		private FsBcar m_idcard; 
		private string m_type; 
		private string m_carno; 
		private string m_owner; 
		private Department m_deptid; 
		private string m_department; 
		private string m_description; 
		private int m_state; 		
		#endregion

		#region Default ( Empty ) Class Constuctor
		/// <summary>
		/// </summary>
		public FsBcar()
		{
			m_idcard = new FsBcar(); 
			m_type = String.Empty; 
			m_carno = String.Empty; 
			m_owner = String.Empty; 
			m_deptid = new Department(); 
			m_department = String.Empty; 
			m_description = String.Empty; 
			m_state = 0; 
		}
		#endregion // End of Default ( Empty ) Class Constuctor

		#region Required Fields Only Constructor
		/// <summary>
		/// required (not null) fields only constructor
		/// </summary>
		public FsBcar(
			FsBcar idcard, 
			string type, 
			string carno)
			: this()
		{
			m_idcard = idcard;
			m_type = type;
			m_carno = carno;
			m_owner = String.Empty;
			m_deptid = null;
			m_department = String.Empty;
			m_description = String.Empty;
			m_state = 0;
		}
		#endregion // End Required Fields Only Constructor

		#region Public Properties
			
		/// <summary>
		/// ID卡号
		/// </summary>
		public FsBcar IdCard
		{
			get { return m_idcard; }
			set
			{
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for IdCard", value, "null");

				m_idcard = value;
			}
		}
			
		/// <summary>
		/// 类型
		/// </summary>
		public string Type
		{
			get { return m_type; }

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Type", value, "null");
				
				if(  value.Length > 10)
					throw new ArgumentOutOfRangeException("Invalid value for Type", value, value.ToString());
				
				m_type = value;
			}
		}
			
		/// <summary>
		/// 车牌
		/// </summary>
		public string CarNo
		{
			get { return m_carno; }

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for CarNo", value, "null");
				
				if(  value.Length > 10)
					throw new ArgumentOutOfRangeException("Invalid value for CarNo", value, value.ToString());
				
				m_carno = value;
			}
		}
			
		/// <summary>
		/// 所有人
		/// </summary>
		public string Owner
		{
			get { return m_owner; }

			set	
			{	
				if(  value != null &&  value.Length > 30)
					throw new ArgumentOutOfRangeException("Invalid value for Owner", value, value.ToString());
				
				m_owner = value;
			}
		}
			
		/// <summary>
		/// 所属机构
		/// </summary>
		public Department Deptid
		{
			get { return m_deptid; }
			set
			{
				m_deptid = value;
			}
		}
			
		/// <summary>
		/// 机构名
		/// </summary>
		public string Department
		{
			get { return m_department; }

			set	
			{	
				if(  value != null &&  value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Department", value, value.ToString());
				
				m_department = value;
			}
		}
			
		/// <summary>
		/// 描述信息
		/// </summary>
		public override string Description
		{
			get { return m_description; }

			set	
			{	
				if(  value != null &&  value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Description", value, value.ToString());
				
				m_description = value;
			}
		}
			
		/// <summary>
		/// 状态
		/// </summary>
		public int State
		{
			get { return m_state; }
			set
			{
				m_state = value;
			}
		}
			
						
		#endregion 
	}
}
